package com.maimao.model.order.es;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2021/3/29 10:40 下午
 */
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
@JsonInclude(JsonInclude.Include.NON_NULL)
public class EsOrderShop implements Serializable {


    private static final long serialVersionUID = -8857830505127466066L;

    public static final String FIELD_ACTUAL_PRICE = "orderShopList.actualPrice";
    public static final String SHOP_ID = "shopId";
    public static final String SHOP_NAME = "shopName";
    public static final String STATUS = "status";

    private String id;

    private String shopId;

    private String shopName;

    /**
     * 店铺优惠券id
     */
    private String shopCouponId;


    /**
     * 运费
     */
    private BigDecimal deliveryFee;

    /**
     * 优惠券总减免
     */
    private BigDecimal couponPrice;

    /**
     * 订单总价（当前店铺的订单总价）
     */
    private BigDecimal totalPrice;

    /**
     * 实际需支付的总价
     */
    private BigDecimal actualPrice;

    /**
     * 订单状态(1-已提交-待付款，2-已付款-待发货，3 部分发货  4 全部发货 5  -交易成功，6-交易取消)
     */
    private Integer status;

    /**
     * 物流编号
     */
    private String shipSn;

    /**
     * 1. 存在换货 0 未退换货 默认 0
     */
    private Integer changeStatus;

    /**
     * 退货申请id
     */
    private String refundId;

    /**
     * 是否开发票
     */
    private Boolean invoice;

    private List<EsOrderGoods> orderGoodsList;
    private Boolean deleted;

    @Override
    public String toString() {
        return "EsOrderShop{" +
                "id='" + id + '\'' +
                ", shopId='" + shopId + '\'' +
                ", shopName='" + shopName + '\'' +
                ", shopCouponId='" + shopCouponId + '\'' +
                ", deliveryFee=" + deliveryFee +
                ", couponPrice=" + couponPrice +
                ", totalPrice=" + totalPrice +
                ", actualPrice=" + actualPrice +
                ", status=" + status +
                ", shipSn='" + shipSn + '\'' +
                ", changeStatus=" + changeStatus +
                ", refundId='" + refundId + '\'' +
                ", invoice=" + invoice +
                ", orderGoodsList=" + orderGoodsList +
                ", deleted=" + deleted +
                '}';
    }
}
